package com.boot23.mapper;

import com.boot23.entity.Hero;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @author wxd
 * @version 1.0
 */
@Mapper
public interface HeroMapper {
    @Insert("insert into hero values(null,#{name},#{money})")
    void insert(Hero hero);
    @Delete("delete from hero where name=#{name}")
    void deleteByName(String name);
    @Update("update hero set name=#{name}, money=#{money} where id=#{id}")
    void updateById(Hero hero);
    @Select("select * from hero")
    List<Hero> select();
}

